package com.atguigu.szdz.dcsyl.service.impl;

import com.atguigu.szdz.dcsyl.service.ZndbService;
import com.atguigu.szdz.dcsyl.utils.MapperUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service("zndbService")
public class ZndbServiceImpl implements ZndbService {
    @Autowired
    MapperUtils mapperUtils;

    @Override
    public List<Map<String, Object>> getZndbList(Integer currentPage, String keyword) {
        String sql = "select * from dc_zndb" + keyword + " limit 10 offset " + (currentPage - 1) * 10;
        System.out.println("sssssssssssss:" + sql);
        return mapperUtils.queryBySql(sql);
    }

    @Override
    public List<Map<String, Object>> getCount(String s) {
        return mapperUtils.queryBySql(s);
    }
}
